<?php

namespace App\Model\Admin;

use Illuminate\Database\Eloquent\Model;

class ProductAttr extends Model
{
    protected $fillable = [
        'product_id','attr_id','attr_value','attr_price'
    ];


    public function product()
    {
        return $this->belongsTo('App\Model\Admin\Product', 'type_id', 'type_id');
    }

    public function attribute()
    {
        return $this->belongsTo('App\Model\Aboot\Attribute', 'attr_id', 'id');
    }
}
